﻿
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using VM.Entity.EntityMap.Files;
using VM.Entity.EntityMap.User;

namespace VM.Entity.EntityDto.Topic
{

    /// <summary>
    /// 话题类别类
    /// </summary>
    public class addtopicTypeDto
    {


        #region Model
        private int _id;
        private string _name;
        private int _billstatus;
        private int? _parentid;
        private string _description;
        private int _createuserid;
        private DateTime _createdate;
        private int _updateuserid;
        private DateTime _updatedate;


        /// <summary>
        /// 内码
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public int id
        {
            set { _id = value; }
            get { return _id; }
        }
        [JsonIgnore]
        public string? code { get; set; }
        /// <summary>
        ///分类名称
        /// </summary>
        public string name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 单据状态 
        /// </summary>
        [JsonIgnore]
        public int billStatus
        {
            set { _billstatus = value; }
            get { return _billstatus; }
        }
        /// <summary>
        /// 上级分类，如有则传，没有不传
        /// </summary>
        public int? parentId
        {
            set { _parentid = value; }
            get { return _parentid; }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string description
        {
            set { _description = value; }
            get { return _description; }
        }
        /// <summary>
        /// 创建人
        /// </summary>
        [JsonIgnore]
        public int createUserId
        {
            set { _createuserid = value; }
            get { return _createuserid; }
        }



        /// <summary>
        /// 图片
        /// </summary>
        [JsonIgnore]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [Navigate(NavigateType.OneToOne, nameof(sys_user.id), nameof(createUserId))]
        public sys_user? createUser { get; set; }



        /// <summary>
        /// 创建时间
        /// </summary>
        [JsonIgnore]
        public DateTime createDate
        {
            set { _createdate = value; }
            get { return _createdate; }
        }
        /// <summary>
        /// 更新人
        /// </summary>
        [JsonIgnore]
        public int updateUserId
        {
            set { _updateuserid = value; }
            get { return _updateuserid; }
        }
        /// <summary>
        /// 图片
        /// </summary>
        [JsonIgnore]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [Navigate(NavigateType.OneToOne, nameof(sys_user.id), nameof(createUserId))]
        public sys_user? updateUser { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [JsonIgnore]
        public DateTime updateDate
        {
            set { _updatedate = value; }
            get { return _updatedate; }
        }
        #endregion Model


    }
}
